package com.yykj.pharmacist.server.controller;

import com.yykj.common.vo.ResultVO;
import com.yykj.pharmacist.server.service.PharmacistService;
import com.yykj.prescription.client.dto.PrescriptionCheckDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/pharmacist")
@Api(tags = {"药师相关服务"})
public class PharmacistController {
    @PostMapping("/prescription/check")
    @ApiOperation("处方手动审核 -- 通过审核或者作废 ")
    public ResultVO checkPrescription(@RequestBody PrescriptionCheckDTO prescriptionCheckDTO){
        pharmacistService.checkPrescription(prescriptionCheckDTO);
        return ResultVO.success();
    }

    private PharmacistService pharmacistService;

    @Autowired
    public void setPharmacistService(PharmacistService pharmacistService) {
        this.pharmacistService = pharmacistService;
    }
}
